# coding = utf-8


def auth(auth_type):
    print("第一", auth_type)

    def outer(func):
        print("第二", func)

        def neier():
            print("第三")
            if auth_type == "local":
                print("我是本地")
            elif auth_type == "ldap":
                print("我是ldap")
        return neier
    return outer


def web():
    print("this is web")
    pass


@auth(auth_type="local")
def login():
    print("this is login")
    pass


@auth(auth_type="ldap")
def home():
    print("this is home")
    pass


web()
login()
home()


